//
//  HomeStess.swift
//  DaRings
//
//  Created by 尹琼 on 2022/10/28.
//

import UIKit


open class HomeStressModel: HomeModel {
    
    public var date: String = ""
    
    public var stress: Int = 0
    
    /// 测量按钮状态
    public var measureState: UIControl.State = .disabled
    
    public var stressTitle: String {
        
        return stress.normalTitle(format: "%02d")
    }
    
    public var state: String {
        
        if stress == 0 {
            return "--"
        }
        
        if stress < 30 {
            return "stress_relaxed".language
        }
        if stress < 60 {
            return "stress_normal".language
        }
        if stress < 80 {
            return "stress_medium".language
        }
        
        return "stress_stressed".language
    }
    
}
